home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_Scroll / DrawingViewWraps.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  8.2 KB  |  262 lines

  1. /* DrawingViewWraps.c generated from DrawingViewWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "DrawingViewWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42.  *    DrawingViewWraps.psw
  43.  *
  44.  *
  45.  *    Version:    2.0
  46.  *    Author:    Ken Fromm
  47.  *    History:
  48.  *            03-07-91        Added this comment.
  49.  */
  50. #line 51 "DrawingViewWraps.c"
  51. void PSWMarkTime( void )
  52. {
  53.   typedef struct {
  54.     unsigned char tokenType;
  55.     unsigned char topLevelCount;
  56.     unsigned short nBytes;
  57.  
  58.     DPSBinObjGeneric obj0;
  59.     DPSBinObjGeneric obj1;
  60.     DPSBinObjGeneric obj2;
  61.     } _dpsQ;
  62.   static const _dpsQ _dpsStat = {
  63.     DPS_DEF_TOKENTYPE, 3, 28,
  64.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* StartTime */
  65.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  66.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  67.     }; /* _dpsQ */
  68.   _dpsQ _dpsF;    /* local copy  */
  69.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  70.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  71.   static long int _dpsCodes[1] = {-1};
  72.   {
  73. if (_dpsCodes[0] < 0) {
  74.     static const char * const _dps_names[] = {
  75.     "StartTime"};
  76.     long int *_dps_nameVals[1];
  77.     _dps_nameVals[0] = &_dpsCodes[0];
  78.  
  79.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  80.     }
  81.   }
  82.  
  83.   _dpsF = _dpsStat;    /* assign automatic variable */
  84.  
  85.   _dpsP[0].val.nameVal = _dpsCodes[0];
  86.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  87. }
  88. #line 45 "DrawingViewWraps.psw"
  89.  
  90. #line 91 "DrawingViewWraps.c"
  91. void PSWReturnTime(int *ElapsedTime)
  92. {
  93.   typedef struct {
  94.     unsigned char tokenType;
  95.     unsigned char topLevelCount;
  96.     unsigned short nBytes;
  97.  
  98.     DPSBinObjGeneric obj0;
  99.     DPSBinObjGeneric obj1;
  100.     DPSBinObjGeneric obj2;
  101.     DPSBinObjGeneric obj3;
  102.     DPSBinObjGeneric obj4;
  103.     DPSBinObjGeneric obj5;
  104.     DPSBinObjGeneric obj6;
  105.     DPSBinObjGeneric obj7;
  106.     DPSBinObjGeneric obj8;
  107.     } _dpsQ;
  108.   static const _dpsQ _dpsStat = {
  109.     DPS_DEF_TOKENTYPE, 9, 76,
  110.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  111.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* StartTime */
  112.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  113.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  114.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  115.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  116.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  117.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  118.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  119.     }; /* _dpsQ */
  120.   _dpsQ _dpsF;    /* local copy  */
  121.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  122.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  123.   static long int _dpsCodes[1] = {-1};
  124.   DPSResultsRec _dpsR[1];
  125.   static const DPSResultsRec _dpsRstat[] = {
  126.     { dps_tInt, -1 },
  127.     };
  128.     _dpsR[0] = _dpsRstat[0];
  129.     _dpsR[0].value = (char *)ElapsedTime;
  130.  
  131.   {
  132. if (_dpsCodes[0] < 0) {
  133.     static const char * const _dps_names[] = {
  134.     "StartTime"};
  135.     long int *_dps_nameVals[1];
  136.     _dps_nameVals[0] = &_dpsCodes[0];
  137.  
  138.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  139.     }
  140.   }
  141.  
  142.   _dpsF = _dpsStat;    /* assign automatic variable */
  143.  
  144.   _dpsP[1].val.nameVal = _dpsCodes[0];
  145.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  146.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  147.   DPSAwaitReturnValues(_dpsCurCtxt);
  148. }
  149. #line 50 "DrawingViewWraps.psw"
  150.  
  151. #line 152 "DrawingViewWraps.c"
  152. void PSWUcachestatus(int *Bsize, int *Bmax, int *Rsize, int *Rmax, int *Blimit)
  153. {
  154.   typedef struct {
  155.     unsigned char tokenType;
  156.     unsigned char topLevelCount;
  157.     unsigned short nBytes;
  158.  
  159.     DPSBinObjGeneric obj0;
  160.     DPSBinObjGeneric obj1;
  161.     DPSBinObjGeneric obj2;
  162.     DPSBinObjGeneric obj3;
  163.     DPSBinObjGeneric obj4;
  164.     DPSBinObjGeneric obj5;
  165.     DPSBinObjGeneric obj6;
  166.     DPSBinObjGeneric obj7;
  167.     DPSBinObjGeneric obj8;
  168.     DPSBinObjGeneric obj9;
  169.     DPSBinObjGeneric obj10;
  170.     DPSBinObjGeneric obj11;
  171.     DPSBinObjGeneric obj12;
  172.     DPSBinObjGeneric obj13;
  173.     DPSBinObjGeneric obj14;
  174.     DPSBinObjGeneric obj15;
  175.     } _dpsQ;
  176.   static const _dpsQ _dpsF = {
  177.     DPS_DEF_TOKENTYPE, 16, 132,
  178.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 361},    /* ucachestatus */
  179.     {DPS_LITERAL|DPS_INT, 0, 0, 4},
  180.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  181.     {DPS_LITERAL|DPS_INT, 0, 0, 3},
  182.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  183.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  184.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  185.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  186.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  187.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  188.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  189.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 19},    /* cleartomark */
  190.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  191.     {DPS_LITERAL|DPS_INT, 0, 0, 5},
  192.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  193.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  194.     }; /* _dpsQ */
  195.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  196.   DPSResultsRec _dpsR[5];
  197.   static const DPSResultsRec _dpsRstat[] = {
  198.     { dps_tInt, -1 },
  199.     { dps_tInt, -1 },
  200.     { dps_tInt, -1 },
  201.     { dps_tInt, -1 },
  202.     { dps_tInt, -1 },
  203.     };
  204.     _dpsR[0] = _dpsRstat[0];
  205.     _dpsR[0].value = (char *)Bsize;
  206.     _dpsR[1] = _dpsRstat[1];
  207.     _dpsR[1].value = (char *)Bmax;
  208.     _dpsR[2] = _dpsRstat[2];
  209.     _dpsR[2].value = (char *)Rsize;
  210.     _dpsR[3] = _dpsRstat[3];
  211.     _dpsR[3].value = (char *)Rmax;
  212.     _dpsR[4] = _dpsRstat[4];
  213.     _dpsR[4].value = (char *)Blimit;
  214.  
  215.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 5);
  216.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,132);
  217.   DPSAwaitReturnValues(_dpsCurCtxt);
  218. }
  219. #line 54 "DrawingViewWraps.psw"
  220.  
  221. #line 222 "DrawingViewWraps.c"
  222. void PSWSetParameters(int LineJoin, int LineCap, float LineWidth, float MiterLimit)
  223. {
  224.   typedef struct {
  225.     unsigned char tokenType;
  226.     unsigned char topLevelCount;
  227.     unsigned short nBytes;
  228.  
  229.     DPSBinObjGeneric obj0;
  230.     DPSBinObjGeneric obj1;
  231.     DPSBinObjGeneric obj2;
  232.     DPSBinObjGeneric obj3;
  233.     DPSBinObjReal obj4;
  234.     DPSBinObjGeneric obj5;
  235.     DPSBinObjReal obj6;
  236.     DPSBinObjGeneric obj7;
  237.     } _dpsQ;
  238.   static const _dpsQ _dpsStat = {
  239.     DPS_DEF_TOKENTYPE, 8, 68,
  240.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: LineJoin */
  241.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 154},    /* setlinejoin */
  242.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: LineCap */
  243.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 153},    /* setlinecap */
  244.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  245.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  246.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: MiterLimit */
  247.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 346},    /* setmiterlimit */
  248.     }; /* _dpsQ */
  249.   _dpsQ _dpsF;    /* local copy  */
  250.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  251.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  252.   _dpsF = _dpsStat;    /* assign automatic variable */
  253.  
  254.   _dpsP[0].val.integerVal = LineJoin;
  255.   _dpsP[2].val.integerVal = LineCap;
  256.   _dpsP[4].val.realVal = LineWidth;
  257.   _dpsP[6].val.realVal = MiterLimit;
  258.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,68);
  259. }
  260. #line 59 "DrawingViewWraps.psw"
  261.  
  262.